<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!--左侧导航-->
<aside class="lyear-layout-sidebar">

    <div id="logo" class="sidebar-header">
        <a href="${ pageContext.request.contextPath}/"><h3>汽车租赁系统</h3></a>
    </div>
    <div class="lyear-layout-sidebar-scroll">

        <nav class="sidebar-main">
            <ul class="nav nav-drawer">
                <li class="nav-item"> <a href="${ pageContext.request.contextPath}/hello"><i class="mdi mdi-home"></i> 首页</a> </li>
                <li class="nav-item"> <a href="${ pageContext.request.contextPath}/${ sessionScope.user.role}/edit?id=${ sessionScope.user.id}"><i class="mdi mdi-home"></i> 个人中心</a> </li>
                <c:if test="${sessionScope.user.role == ''  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/admin/list"><i class="mdi mdi-format-align-justify"></i>管理员</a> </li>
                </c:if>
                <c:if test="${sessionScope.user.role == 'admin'  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/user/list"><i class="mdi mdi-format-align-justify"></i>用户</a> </li>
                </c:if>
                <c:if test="${sessionScope.user.role == 'admin'  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/car/list"><i class="mdi mdi-format-align-justify"></i>汽车</a> </li>
                </c:if>
                <c:if test="${sessionScope.user.role == 'admin' ||  sessionScope.user.role == 'user'  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/yuyue/list"><i class="mdi mdi-format-align-justify"></i>预约试驾</a> </li>
                </c:if>
                <c:if test="${sessionScope.user.role == 'admin' ||  sessionScope.user.role == 'user'  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/rentorder/list"><i class="mdi mdi-format-align-justify"></i>租车订单</a> </li>
                </c:if>
                <c:if test="${sessionScope.user.role == 'admin'  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/userComment/list"><i class="mdi mdi-format-align-justify"></i>留言</a> </li>
                </c:if>
                <c:if test="${sessionScope.user.role == 'admin'  }">
                    <li class="nav-item"> <a href="${pageContext.request.contextPath}/notice/list"><i class="mdi mdi-format-align-justify"></i>公告</a> </li>
                </c:if>

             <%--自定义查询--%>
                <c:if test="${ sessionScope.user.role == ''}">
                    <li class="nav-item"> <a href="${ pageContext.request.contextPath}/q?t=1">
                        <i class="mdi mdi-format-align-justify"></i>自定义查询</a>
                    </li>
                </c:if>

                            </ul>
        </nav>

    </div>

</aside>
<!--End 左侧导航-->


